package com.kimoge.spring6.validation.methodtwo;

import jakarta.validation.constraints.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author kimoge
 * @date 2025/8/30
 * @description
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Person {
    //注解相对固定，不够灵活
    @NotBlank
    String name;
    @Min(0)
    @Max(100)
    int age;
    @Pattern(regexp = "^['男'|'女']$")
    String sex;
}
